import sys

result = {}

for i in range(0, 110):
    result[str(i) + "min"] = 9999999999999.0

for line in sys.stdin:
    line = line.strip()
    key = line.split("\t")[0]
    value = float(line.split("\t")[1])
    
    if value < result[key]:
        result[key] = value

for key, value in result.items():
	sys.stdout.write("%s\t%s\n" % (key, str(value)))